<template>
  <view class="notice-detail-container">
    <e-navbar leftTitle="消息详情"></e-navbar>
    <u-gap height="15"></u-gap>
    <view class="font-40 pingfang-heavy p-l-60 p-r-60 text-center">{{content.title}}</view>
    <view class="font-26 text-999 text-center m-t-20">{{content.created_at}}</view>
    <view class="notice-content">
      {{content.message}}
    </view>
    <u-gap height="30"></u-gap>
  </view>
</template>

<script>

export default {
  data() {
    return {
			content: "",

    };
  },
  onLoad(options) {
    // if(options.content){
		// 	this.content = JSON.parse(decodeURIComponent(options.content));
		// 	console.log('ccccc', content);
    //   // this.title = options.title;
    // }
    if(options.id){
      this.getNoticeDetail(options.id);
    }
  },
  methods: {
    // 获取通知详情
    async getNoticeDetail(id){
      const res = await this.$api.notice_info({id});
      if(res.code == 1){
        this.content = res.data;
      }
    }
  },
}
</script>

<style lang="scss" scoped>
  .notice-detail-container{
    .notice-content{
      margin-top: 20rpx;
      padding: 0 30rpx;
      line-height: 46rpx;
      text-indent: 2em;
      letter-spacing: 2rpx;
    }
  }
</style>
